import request from '@/utils/request'

export function getProducts(query) {
  return request({
    url: '/distribution/product/getList',
    method: 'post',
    data: query
  })
}

export function getProduct(id) {
  return request({
    url: '/distribution/product/getDetail',
    method: 'post',
    data: id
  })
}

export function saveProduct(formdata) {
  return request({
    url: '/distribution/product/save',
    method: 'post',
    data: formdata
  })
}
export function changeStatusByProductID(id) {
  return request({
    url: '/distribution/product/change-status',
    method: 'post',
    data: id
  })
}

export function removeProductByID(id) {
  return request({
    url: '/distribution/product/remove',
    method: 'post',
    data: id
  })
}

export function fetchProductAvailable() {
  return request({
    url: '/distribution/product/getAvailable',
    method: 'post'
  })
}

